package csc.fresher.finalgroupfour.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import csc.fresher.finalgroupfour.dao.RoleDAO;
import csc.fresher.finalgroupfour.domain.Role;

@Service
public class RoleService {
	@Autowired
	private RoleDAO roleDAO;
	
	public void addRole(Role role) {
		roleDAO.addRole(role);
	}

	public List<Role> listRoles() {
		return roleDAO.listRoles();
	}

	public void updateRole(Role role) {
		roleDAO.updateRole(role);
	}

	public void deleteRole(Role role) {
		roleDAO.deleteRole(role);
	}
	
	public Role findRole(String roleName) {
		return roleDAO.findRole(roleName);
	}
}
